////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef __WN_WINDOWS_LISTEN_CONNECTION_H__
#define __WN_WINDOWS_LISTEN_CONNECTION_H__

#include "WNNetworking/inc/WNWindowsConnection.h"
#include "WNNetworking/inc/WNNetworkManager.h"

namespace WNNetworking {
    class WNWindowsINConnection;
    class WNWindowsListenConnection : public WNWindowsConnection {
    public:
        WNWindowsListenConnection(WNNetworkManager& _manager, WNConnectionType _type, WN_UINT16 _port, WNConnectedCallback _connected);
        virtual ~WNWindowsListenConnection();
        WNNetworking::WNNetworkingError Initialize();
        WNWindowsINConnection* AcceptConnection();
    private:
        WN_UINT16 mPort;
        WNConnectedCallback mConnectedCallback;
        WNConnectionType mType;
        bool mInitialized;
    };
};

#endif//__WN_WINDOWS_LISTEN_CONNECTION_H__
